package com.webservice.service.impl;

import com.webservice.Response;
import com.webservice.Storage;
import com.webservice.entity.User;
import com.webservice.service.UserService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with LXD
 *
 * @author:Luhui
 * @qq:729913162
 * @Date:2018-08-25
 * @Time:22:13
 */
@Service
public class UserServiceImpl implements UserService {
    @Override
    public List<User> getUsers() {
        return Storage.users;
    }

    @Override
    public Response delete(int id) {
        Storage.users.remove(id);
        return new Response("200","success");
    }

    @Override
    public Response insert(User user) {
        return null;
    }

    @Override
    public Response update(User user) {
        return null;
    }

    @Override
    public User getUser(int id) {
        return Storage.users.get(id);
    }
}
